﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using BaMusaSoft.RPS.ViewModel;
using BaMusaSoft.RPS.View.Services;

namespace BaMusaSoft.RPS.View
{
    /// <summary>
    /// Interaction logic for AddOutboxWindow.xaml
    /// </summary>
    public partial class AddOutboxWindow : Window
    {
        public AddOutboxWindow()
        {
            InitializeComponent();
        }
        //public AddOutboxWindow(OutboxViewModel vm):this()
        //{
        //    this.DataContext = vm;

        //}

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void Grid_KeyDown(object sender, KeyEventArgs e)
        {
            var uie = e.OriginalSource as UIElement;
            if (e.Key == Key.Enter)
            {
                e.Handled = true;
                uie.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
            }
        }

        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
           this.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
        }

    }
}
